Technical Q&AQTW 95- Borland 5.0 C++ link error with QuickTime 3 for Windows SDK (3-May-99)Q: I've downloaded the QuickTime 3 for Windows SDK and my Borland 5.0 C++ compiler-linker doesn't like the ".lib" files (the 32-bit QuickTime 2.1.2 files were working fine). I get the error, "Bad object file 'C:\BC5\LIB\qtmlClient.lib' near file offset 0" when I'm trying to link via tlink32. What's wrong? A: Borland has it's own 32-bit lib format that's incompatible with uSoft's (and the Borland linker does not read anything but it's own format). The old QTW 2.1.2 SDK shipped with separate uSoft and Borland 32-bit libs. QuickTime 3 for Windows ships with only the uSoft libs. There are two ways to workaround this problem: 1. Use the qtmlclient.dll provided with the QuickTime 3 for Windows SDK, which contains everything in the qtmlclient.lib library linked into a dll. Borland has a tool that can create an import lib for you (don't call it qtmlclient.lib, or you'll get really confused). The only problem with this approach is the names exported from the DLL do not have the leading underscore that Borland is expecting. To get around this underscore problem, you can add an IMPORTS section to your project's DEF file and include an explicit import statement for each QuickTime function you need to use, for example: IMPORTS _ActivatePalette = qtmlclient.ActivatePalette _AddCallBackToTimeBase = qtmlclient.AddCallBackToTimeBase _AddComp = qtmlclient.AddComp _AddEmptyTrackToMovie = qtmlclient.AddEmptyTrackToMovie _AddFilePreview = qtmlclient.AddFilePreview . . . etc. 2. Use a compiler/linker that recognizes uSoft libs -- Scott Kuechle Worldwide Developer Technical Support Technical Q&As | Contents Previous Question | Next Question To contact us, please use the Contact Us page. |